from flask import Blueprint
from .files import files_bp, rootheal_files_bp
from .logs import logs_bp
from .rootheal import rootheal_bp
from .detection import detection_bp  # 添加这行导入
from .data_cleanup import data_cleanup_bp  # 添加数据清理蓝图导入


# 创建主蓝图
main = Blueprint('main', __name__)

# 注册所有蓝图
def register_blueprints(app):
    app.register_blueprint(files_bp, url_prefix='/api/files')
    app.register_blueprint(rootheal_files_bp, url_prefix='/api/rootheal-files')
    app.register_blueprint(logs_bp, url_prefix='/api/logs')
    app.register_blueprint(rootheal_bp, url_prefix='/api/rootheal')
    app.register_blueprint(detection_bp, url_prefix='/api/detection')  # 添加这行注册
    app.register_blueprint(data_cleanup_bp, url_prefix='/api/data-cleanup')  # 添加数据清理蓝图注册
   